/*
 * ColaToColaReader.cpp
 *
 *  Created on: Nov 16, 2011
 *      Author: gonzalo
 */

#include "ColaToColaReader.h"


ColaToColaReader::ColaToColaReader(ColaMensajesSDL* aLeer,ColaMensajesSDL* aLlenar) {
	this->aLlenar = aLlenar;
	this->aLeer = aLeer;
	this->running = true;
}

void *ColaToColaReader::run(){

	Event* leido = NULL;
	while(running){
		leido = aLeer->getEvent();
		if (leido) {
			aLlenar->setEvent(leido);
		}
	}

	return NULL;
}
ColaToColaReader::~ColaToColaReader() {
}

void ColaToColaReader::terminar(){
	this->running = false;
}
